import numpy as np

a = np.array([
    [1, 2, 3, 4]
])

b = np.array([
    [5, 6, 7, 8],
    [10, 20, 30, 40]
])

for x, y in np.nditer([a, b]):
    print('%d:%d' % (x, y), end=",")
